package es.upv.tricia.util;

import android.content.Context;
import android.net.ConnectivityManager;

public class ToolKit
{
	public static boolean isInternetAvailable(Context context)
	{
		ConnectivityManager cm = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);

		if (cm.getActiveNetworkInfo() != null) {
			return cm.getActiveNetworkInfo().isConnectedOrConnecting();
		} else {
			return false;
		}
	}
}